<template>
    <div>
        <div>组织</div>
        <el-button type="primary" @click="againGetDataFun">再次获取信息</el-button>
    </div>
</template>
<script setup>
import { userStore } from '@/store/index'
import { userListUrl, orgListUrl } from '@/api/reqUrl'
const { proxy } = getCurrentInstance()
const serviceReq = proxy.$serviceReq
const userState = userStore()

const params = {
    timestamp: userState.userInfoData?.timestamp
}

const getUserList = async () => {
    const resData = await serviceReq.get(userListUrl, { params })
    console.log('res===userListUrl', resData)
}

const getOrgList = async () => {
    const resData = await serviceReq.get(orgListUrl, { params })
    console.log('res===orgListUrl', resData)
}

const againGetDataFun = () => {
    getUserList()
    getOrgList()
}

getUserList()
getOrgList()
</script>
<style scoped lang="scss"></style>
